package com.example.internet;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;

public class ActivityWelcome extends Activity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_welcome);

        //倒数2秒进入主页
        CountDownTimer countDownTimer = new CountDownTimer(2000,1000) {
            @Override
            public void onTick(long millisUntilFinished) {
            }
            @Override
            public void onFinish() {
                lonin();
            }
        };
        countDownTimer.start();
    }
    private void lonin() {
        Intent intent = new Intent(ActivityWelcome.this,MainActivity.class);
        startActivity(intent);
        finish();
    }
}